<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Wednesday</title>
<style type="text/css">
body { margin:0 auto; padding:0; width: 960px; margin: auto; background-color:#000; color:#FFF; }
header{width:960px; height:600px;background-image:url(../img/background.jpg); background-repeat:no-repeat; background-position:center top; position:relative;}
.logo{ position:absolute; top:100px; left:340px;}
.content{padding:0;}
.c1{margin:0; width:220px;float:left; padding:0;}
.list{margin:10px; margin-top:0; margin-left:0; border:dotted; border-color:#666; background-color:#333; height:200px; }
.img{margin:10px; margin-left:0;border:dotted; border-color:#666; background-color:#333; height:200px;}
.friend{margin:10px; margin-bottom:0; margin-left:0;border:dotted; border-color:#666; background-color:#333; height:200px;}
.c2{ margin-top:10px; margin-left:220px; border-color:#333; border:dashed; height:630px; padding:0;}
.blog{ margin:10px; margin-top:10px; height:400px;  background-color:#333; }
.comment{ margin:10px; height:200px;  background-color:#333; }
footer{margin-top:20px; text-align:right;}
nav{ position:absolute; top:300px; right:200px;}
</style>
<script type="text/javascript">
function is_email(field,alerttxt){
	with (field){
		atpos=value.indexOf("@")
		dotpos=value.lastIndexOf(".")
		if (atpos<1||dotpos-atpos<2) {
			alert(alerttxt);
			return false;
		}else {
			return true;
		}
	}
}

function validate_form(thisform){
	with (thisform){
		if (is_email(email,"非法的E-Mail地址!")==false){
			email.focus();
			return false;
		}	
	}
}


</script>
</head>
<body>

<header>
	<div class="logo" id="logo">
	<p><img src="../img/logo.png" title="One Piece Logo"/></p></div>
	<nav>首页|文章|相册|关于我</nav>
</header>
<div class="content">
	<div class="c1">
		<div class="list" title="文章列表"></div>
		<div class="img" title="图片列表"></div>
		<div class="friend" title="好友列表"></div>
	</div>
	<div class="c2">
		<div class="blog" title="博客正文">
		<form onsubmit="return validate_form(this);" method="post">
		Name: <input type="text" name="userName" size="20" > 
		Age: <input type="number" name="userAge" size="10"> <br/>
		Email: <input type="text" name="email" size="30"> <br/>
		<input type="submit" value="Submit"> 
		</form></div>
		<div class="comment" title="相关评论"></div>
	</div>
</div>
<footer>Written By Bighead.</footer>
</body>
</html>